<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/5/22
 * Time: 8:48
 */

namespace app\api\model;


class Comment extends BaseModel
{
    protected $visible = ['content','reply','user','comment_image','create_time','reply_time'];

    public function user()
    {
        return $this->belongsTo('user','uid','id');
    }

    public function commentImage()
    {
        return $this->hasMany('CommentImage','comment_id','id');
    }
}